/**
 * @file   MsgFactory.java
 * @date   2012-11-14下午11:36:19
 * @author User
 */
package com.gzceb.zhgjj.model;

import java.util.Map;

import com.gzceb.zhgjj.util.PropertiesUtils;
import com.gzceb.zhgjj.util.XMLUtils;

/**
 * <p>Msg工厂类。</p>
 *
 * @date   2012-11-14下午11:36:19 
 * @author liqing
 * @description 根据传入参数实例化不同Msg子类
 */
public class MsgFactory {

	
	public MsgFactory(){
		
	}
	public static AbstractMsg newInstance(Object message){
		Map<String,String> tmpMap = XMLUtils.XMLParser((String)message);
		
		if(tmpMap.get("Tx_code").equals(Constants.TXCODE_TTF001)){
			return new TTF001Msg(PropertiesUtils.getValue("destPath"));
		}else{
			return new TAG003Msg(PropertiesUtils.getValue("destPath"));
		}
	}
}
